{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nimport { isUnitless, convertLength, responsiveProperty, alignProperty, fontGrid } from './cssUtils';\nexport default function responsiveFontSizes(themeInput) {\n  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  const {\n    breakpoints = ['sm', 'md', 'lg'],\n    disableAlign = false,\n    factor = 2,\n    variants = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline']\n  } = options;\n  const theme = _extends({}, themeInput);\n  theme.typography = _extends({}, theme.typography);\n  const typography = theme.typography;\n\n  // Convert between CSS lengths e.g. em->px or px->rem\n  // Set the baseFontSize for your project. Defaults to 16px (also the browser default).\n  const convert = convertLength(typography.htmlFontSize);\n  const breakpointValues = breakpoints.map(x => theme.breakpoints.values[x]);\n  variants.forEach(variant => {\n    const style = typography[variant];\n    const remFontSize = parseFloat(convert(style.fontSize, 'rem'));\n    if (remFontSize <= 1) {\n      return;\n    }\n    const maxFontSize = remFontSize;\n    const minFontSize = 1 + (maxFontSize - 1) / factor;\n    let {\n      lineHeight\n    } = style;\n    if (!isUnitless(lineHeight) && !disableAlign) {\n      throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported non-unitless line height with grid alignment.\nUse unitless line heights instead.` : _formatMuiErrorMessage(6));\n    }\n    if (!isUnitless(lineHeight)) {\n      // make it unitless\n      lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize);\n    }\n    let transform = null;\n    if (!disableAlign) {\n      transform = value => alignProperty({\n        size: value,\n        grid: fontGrid({\n          pixels: 4,\n          lineHeight,\n          htmlFontSize: typography.htmlFontSize\n        })\n      });\n    }\n    typography[variant] = _extends({}, style, responsiveProperty({\n      cssProperty: 'fontSize',\n      min: minFontSize,\n      max: maxFontSize,\n      unit: 'rem',\n      breakpoints: breakpointValues,\n      transform\n    }));\n  });\n  return theme;\n}","map":{"version":3,"names":["_extends","formatMuiErrorMessage","_formatMuiErrorMessage","isUnitless","convertLength","responsiveProperty","alignProperty","fontGrid","responsiveFontSizes","themeInput","options","breakpoints","disableAlign","factor","variants","theme","typography","convert","htmlFontSize","breakpointValues","map","x","values","forEach","variant","style","remFontSize","parseFloat","fontSize","maxFontSize","minFontSize","lineHeight","Error","process","env","NODE_ENV","transform","value","size","grid","pixels","cssProperty","min","max","unit"],"sources":["/data/messenger.client/node_modules/@mui/material/esm/styles/responsiveFontSizes.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@mui/utils\";\nimport { isUnitless, convertLength, responsiveProperty, alignProperty, fontGrid } from './cssUtils';\nexport default function responsiveFontSizes(themeInput, options = {}) {\n  const {\n    breakpoints = ['sm', 'md', 'lg'],\n    disableAlign = false,\n    factor = 2,\n    variants = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline']\n  } = options;\n  const theme = _extends({}, themeInput);\n  theme.typography = _extends({}, theme.typography);\n  const typography = theme.typography;\n\n  // Convert between CSS lengths e.g. em->px or px->rem\n  // Set the baseFontSize for your project. Defaults to 16px (also the browser default).\n  const convert = convertLength(typography.htmlFontSize);\n  const breakpointValues = breakpoints.map(x => theme.breakpoints.values[x]);\n  variants.forEach(variant => {\n    const style = typography[variant];\n    const remFontSize = parseFloat(convert(style.fontSize, 'rem'));\n    if (remFontSize <= 1) {\n      return;\n    }\n    const maxFontSize = remFontSize;\n    const minFontSize = 1 + (maxFontSize - 1) / factor;\n    let {\n      lineHeight\n    } = style;\n    if (!isUnitless(lineHeight) && !disableAlign) {\n      throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported non-unitless line height with grid alignment.\nUse unitless line heights instead.` : _formatMuiErrorMessage(6));\n    }\n    if (!isUnitless(lineHeight)) {\n      // make it unitless\n      lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize);\n    }\n    let transform = null;\n    if (!disableAlign) {\n      transform = value => alignProperty({\n        size: value,\n        grid: fontGrid({\n          pixels: 4,\n          lineHeight,\n          htmlFontSize: typography.htmlFontSize\n        })\n      });\n    }\n    typography[variant] = _extends({}, style, responsiveProperty({\n      cssProperty: 'fontSize',\n      min: minFontSize,\n      max: maxFontSize,\n      unit: 'rem',\n      breakpoints: breakpointValues,\n      transform\n    }));\n  });\n  return theme;\n}"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,SAASC,qBAAqB,IAAIC,sBAAsB,QAAQ,YAAY;AAC5E,SAASC,UAAU,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,YAAY;AACnG,eAAe,SAASC,mBAAmB,CAACC,UAAU,EAAgB;EAAA,IAAdC,OAAO,uEAAG,CAAC,CAAC;EAClE,MAAM;IACJC,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IAChCC,YAAY,GAAG,KAAK;IACpBC,MAAM,GAAG,CAAC;IACVC,QAAQ,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU;EAC7H,CAAC,GAAGJ,OAAO;EACX,MAAMK,KAAK,GAAGf,QAAQ,CAAC,CAAC,CAAC,EAAES,UAAU,CAAC;EACtCM,KAAK,CAACC,UAAU,GAAGhB,QAAQ,CAAC,CAAC,CAAC,EAAEe,KAAK,CAACC,UAAU,CAAC;EACjD,MAAMA,UAAU,GAAGD,KAAK,CAACC,UAAU;;EAEnC;EACA;EACA,MAAMC,OAAO,GAAGb,aAAa,CAACY,UAAU,CAACE,YAAY,CAAC;EACtD,MAAMC,gBAAgB,GA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